//
//  GMMyselfSecondCell.m
//  Teecloud
//
//  Created by 小熊 on 2018/6/26.
//  Copyright © 2018年 小熊. All rights reserved.
//

#import "GMMyselfSecondCell.h"
#import "GMRowItem.h"

@interface GMMyselfSecondCell ()
@property (weak, nonatomic) IBOutlet UILabel *name;
@property (weak, nonatomic) IBOutlet UILabel *subTitle;
@property (weak, nonatomic) IBOutlet UIImageView *arrowImageView;


@end

@implementation GMMyselfSecondCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.selectionStyle = UITableViewCellSelectionStyleNone;
}
- (void)setModel:(XZGradeIconModel *)model{
    _model = model;
    //设置星星等级的宽度
    NSInteger totalNum = model.CrownCount + model.SunCount+model.MoonCount+model.StarCount;
    self.levelViewWidth.constant = totalNum *20;
    
    [self.levelView setCrownCount:model.CrownCount SunCount:model.SunCount MoonCount:model.MoonCount StarCount:model.StarCount];
}
- (void)setItem:(GMRowItem *)item{
    _item = item;
    self.name.text = item.title;
    self.subTitle.text = item.subTitle;
    if (item.isHiddeArrow) {
        self.arrowImageView.hidden = true;
    }else{
        self.arrowImageView.hidden = false;
    }
    
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
